<extend name="Layout/ins_popup" />
<block name="content">
	{:W('PageHeader/popup',array('name'=>'添加权限组'))}
	<div class="col-sm-8 last sub_content">
		<form id="form_data" name="form_data"method="post" class="well form-horizontal clearfix">
			<input type="hidden" name="ajax" id="ajax" value="0">
			<input type="hidden" name="opmode" id="opmode" value="add">
			<input type="hidden" name="controller" value="{$controller}">
			<div class="form-group col-xs-12">
				<label class="col-sm-4 control-label" for="name">名称*：</label>
				<div class="col-sm-8">
					<input class="form-control"  type="text" id="name" name="name" check="require" msg="请输入名称">
				</div>
			</div>

			<div class="form-group col-xs-12">
				<label class="col-sm-4 control-label" for="sort">排序：</label>
				<div class="col-sm-8">
					<input class="form-control"  type="text" id="sort" name="sort" >
				</div>
			</div>

			<div class="form-group col-xs-12">
				<label class="col-sm-4 control-label" for="is_del">状态：</label>
				<div class="col-sm-8">
					<select  class="form-control" name="is_del" id="is_del">
						<option  value="0">启用</option>
						<option value="1">禁用</option>
					</select>
				</div>
			</div>
			<div class="form-group col-xs-12">
				<label class="col-sm-4 control-label" for="remark" >备注：</label>
				<div class="col-sm-8" >
					<textarea class="form-control" name="remark" id="remark" rows="5" class="col-xs-12" ></textarea>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			if (check_form("form_data")) {
			var vars = $("#form_data").serialize();			
				sendAjax("{:U('save')}", vars, function(data) {
					if (data.status) {
						ui_alert(data.info, function() {
							parent.location.reload(true);
							myclose();
						});
					}else{
						ui_error(data.info);
					}
				});			
			}
		}
		
	</script>
</block>